﻿#region Using

using GameCommon.Services;

using Microsoft.Xna.Framework;

#endregion

namespace GameCommon.Converters
{
    public class ColorConverter : ITypeConverter<string, Color>
    {
        public Color Convert(string value)
        {
            if (!string.IsNullOrEmpty(value))
            {
                return Service.ColorService.HexToColor(value);
            }

            return Service.ColorService.HexToColor("#000000");
        }
    }
}